let sessionStorage = window.sessionStorage;
let localStorage = window.localStorage;

export default{
    local:{
        getItem:function(item){
            return localStorage.getItem(item);
        },
        setItem:function(item,value){
            localStorage.setItem(item,JSON.stringify(value));
        },
        removeItem:function(item){
            localStorage.removeItem(item);
        },
        clear:function(){
            localStorage.clear();
        }
    },

    session:{
        getItem:function(item){
            return sessionStorage.getItem(item);
        },
        setItem:function(item,value){
            sessionStorage.setItem(item,JSON.stringify(value));
        },
        removeItem:function(item){
            sessionStorage.removeItem(item);
        },
        clear:function(){
            sessionStorage.clear();
        }
    },
}
